<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://www.springmodules.org/tags/commons-validator" prefix="validator" %>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form" %>
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring" %>
<%@ page isELIgnored="false"%>

<html>
<head>
	<title>登陆</title>
	<validator:javascript formName="loginCommand" dynamicJavascript="true"/> 
</head>

<body>
<br>
<h1 align="center">Welcome !</h1>
<h2 align="center">This is a meal booking system .</h2>

<form method="POST" action="/login.do" name="nameNoMetter" onsubmit="return validateLoginCommand(this)">
<table height="40%" width="100%" >
	<tr valign="middle">
		<td>
			<table align="center">
				<tr>	
					<th>用户名&nbsp;</th>	
					<spring:bind path="user.userId">
					<td>							
						<input type="text" name="${status.expression}"
								value="${status.value}" maxlength="20"/>
					</td>								
					<td>
						<font color="red">${status.errorMessage}</font>
					</td>
					</spring:bind>
				</tr>
				<tr>	
					<th>密码&nbsp;</th>
					<td><form:password path="user.password" maxlength="20"/></td>
					<td><form:errors path="user.password" cssClass="error"/></td>
				</tr>
				<tr>			
					<td colspan="2" align="center">
						<input type="submit" value="登陆" />
					</td>
				</tr>
			</table>
		</td>
	</tr>
	<tr>
		<td colspan="2" align="center">还没有账户？
			<input type="button" style="width:80px" value="注册一个" onclick="window.location = '/register.do'"/>
		</td>
	</tr>	
</table>	

<table height="40%" width="100%" >
	<tr>
		<td colspan="2" align="center">
			<img src="/static_files/images/appengine-noborder-120x30.gif" alt="由 Google App Engine 提供支持" />
		</td>
	</tr>
</table>
</form>

</body>
</html>
